update
/api/v1/accounts/:account_id/webhook_subscriptions/:id
Update a webhook subscription
Changes the URL, events, label or payload format, or turns the subscription off and on. Re-enabling a subscription that was disabled for failing clears its failure state.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id
|
Must be a number. | Required |
Store (account) ID |
id
|
Must be a number. | Required |
Webhook subscription ID |
events
|
Must be an array of String | Optional |
Replaces the list of events, or ‘[“*”]` for every event |
event
|
Must be a String | Optional |
A single event. Same as |
target_url
|
Must be a String | Optional |
Public https URL that will receive the POST requests |
description
|
Must be a String | Optional |
Your own label, up to 255 characters |
payload_format
|
Must be a String | Optional |
|
enabled
|
Must be one of: true, false, 1, 0.
|
Optional |
false to pause deliveries, true to resume them |
Error Codes
| Code | Description |
|---|---|
401
|
Unauthorized – invalid or missing API token |
404
|
Store or subscription not found |
422
|
Validation failed – check `errors` for details |
Returns
Code: 200
The updated webhook subscription
| Name | Type | Required | Description |
|---|---|---|---|
id
|
Must be a Integer | Required |
Unique subscription ID |
account_id
|
Must be a Integer | Required |
Parent store ID |
events
|
Must be an array of String | Required |
Events delivered to this URL, or ‘[“*”]` for every event |
event
|
Must be a String | Required |
The event, when there is exactly one (kept for older integrations) (nil allowed) |
target_url
|
Must be a String | Required |
URL that receives the POST requests |
description
|
Must be a String | Required |
Your own label for the subscription (nil allowed) |
payload_format
|
Must be a String | Required |
|
enabled
|
Must be one of: true, false, 1, 0.
|
Required |
Whether events are being delivered |
disabled_at
|
Must be a String | Required |
ISO 8601 time the subscription was disabled (nil allowed) |
disabled_reason
|
Must be a String | Required |
|
last_delivery_at
|
Must be a String | Required |
ISO 8601 time of the most recent delivery attempt (nil allowed) |
last_delivery_status
|
Must be a Integer | Required |
HTTP status your URL returned on the most recent attempt (nil allowed) |
last_delivery_error
|
Must be a String | Required |
Why the most recent attempt failed (nil allowed) |
created_at
|
Must be a String | Required |
ISO 8601 creation timestamp |
updated_at
|
Must be a String | Required |
ISO 8601 last-update timestamp |